package com.atung.parking.enums;

import lombok.Getter;

/**
 * @author Administrator
 */

@Getter
public enum OrderType {

    PARKING_ORDER("车位订单"),
    PACKAGE_ORDER("套餐订单");
    private final String description;

    OrderType(String description) {
        this.description = description;
    }
    public static String getDescriptionByName(String name) {
        for (OrderType type : values()) {
            if (type.name().equals(name)) {
                return type.getDescription();
            }
        }
        throw new IllegalArgumentException("Unknown description: " + name);
    }
}

